package test.cglib;


import org.springframework.cglib.proxy.Enhancer;

import java.lang.reflect.Method;

public class CglibDemo {

    public static void main(String[] args) {
        TargetTest targetTest = new TargetTest();
        Enhancer enhancer = new Enhancer();
        enhancer.setSuperclass(TargetTest.class);
        TargetTest targetTest1 = (TargetTest) enhancer.create();
        targetTest1.test();
    }
}
